package com.example.feignapi.client;

import com.weiiew.common.entity.cal.TranslationRecipe;
import com.weiiew.common.entity.simple.DoublePair;
import com.weiiew.common.entity.vo.RecipeVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Description
 * @Author 魏锴
 * @Date 2025/4/3
 */
@FeignClient(name = "recipeService")
public interface RecipeClient {
    @RequestMapping("/recipe/feign/list/build")
    List<RecipeVO> getRecipeByBuildingId(@RequestParam("build") int build);
    @RequestMapping("/recipe/feign/count/recipe/build")
    Long countRecipeBuild(@RequestParam("build") int build);

    @RequestMapping("/recipe/feign/list/ingredient")
    List<RecipeVO> getRecipeByIngredientId(@RequestParam("item") Integer item);

    @RequestMapping("/recipe/feign/list/product")
    List<RecipeVO> getRecipeByProductId(@RequestParam("item") Integer item);

    @PostMapping("/recipe/feign/list/item")
    List<DoublePair> getFactoryRecipeById(@RequestParam("item") Integer item, @RequestParam("recipe") Integer recipe);

    @PostMapping("/recipe/feign/list/translation")
    TranslationRecipe getTranslationRecipe(@RequestParam("item") Integer item, @RequestParam("recipe") Integer recipe);
}
